package logic

import (
	"context"
	"shop_srv/model/redis"

	"shop_srv/internal/svc"
	"shop_srv/shop"

	"github.com/zeromicro/go-zero/core/logx"
)

type CheckLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewCheckLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CheckLogic {
	return &CheckLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *CheckLogic) Check(in *shop.CheckRequest) (*shop.CheckResponse, error) {
	// todo: add your logic here and delete this line
	redis.Check(in.UserId, in.Check)
	return &shop.CheckResponse{Success: true}, nil
}
